Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a hotness thread sort #6649

Merged
merged 2 commits into from
Nov 23, 2024
Merged

Add a hotness thread sort #6649

merged 2 commits into from
Nov 23, 2024

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Nov 23, 2024

Soft-depends on bluesky-social/atproto#3082


This adds a new sorting mode ("hotness") and makes it a default for people who never updated their Thread Preferences (needs package bump). If you previously explicitly expressed a different preference, your old choice will be respected.

Currently, the default thread setting is "oldest first". This means that whoever comments first effectively owns the space above the fold, and there isn't much incentive to reply later — after a certain cutoff, unless you already have an existing follower base for whom your posts is prioritized, your reply will be seen by very few people.

The "hotness" ranking tries to fix this. It is not ideal (and we'll be tweaking it with time), but the goal is to give a chance to recent comments to get people's eyeballs, especially in larger threads — so that people can like your comment even if you haven't already built a significant following. (Most people who already follow you will see your comment at the top with either ranking because "prioritize follows" is true by default — so this doesn't change whether your followers see your posts.)

With the "hotness" ranking, recent comments (whether you have followers or not) will be seen by more users before being "weighed down" by the passage of time. However, likes will make some comments "bubble up" despite being old. The formula I'm using is inspired by this one in Lemmy though it's worth noting we don't have a concept of downvotes. Since we need a mechanic to slightly weigh recent comparatively unpopular posts down, I've added another term to the exponential decay. Other than that, the formula is pretty similar. In short, it tries to balance showing newer stuff with surfacing some of the well-liked older stuff.

Again, the goal isn't to get this 100% right on the first try. However, we'd like conversations to be more dynamic, even in larger threads, and to give more people a chance to be seen — even if they haven't built a following. The exact heuristic will change over time and will likely incorporate other signals (e.g. whether OP liked the reply, whether OP is mutual, etc) so its name ("hotness") is intentionally fuzzy and non-committal. It's also worth emphasizing that this doesn't change much for smaller conversations because people who follow each other already see each other at the top of any comment sections, regardless of their chosen sorting function.

Test Plan

Verify a user with no explicit past chosen preference gets the "hotness" ranking. (This part depends on bluesky-social/atproto#3082.)

Verify a user with an existing past chosen preference keeps their existing preference.

Verify the hotness ranking prioritizes recent posts (comment out the "is self post" check, post something, and verify your comment appears at the top). Then verify that hotness decays over time — add + 24 or + 48 etc to the hoursAgo variable and verify that your post (with no likes) starts moving downwards (simulating time passing). Then hardcode some likeCount for your test post and verify that likes let it "bubble up" somewhat.

@arcalinea arcalinea temporarily deployed to hotness - social-app PR #6649 November 23, 2024 02:24 — with Render Destroyed
Copy link

github-actions bot commented Nov 23, 2024

Old size New size Diff
8.06 MB 8.13 MB 75.05 KB (0.91%)

@arcalinea arcalinea temporarily deployed to hotness - social-app PR #6649 November 23, 2024 02:50 — with Render Destroyed
@gaearon gaearon merged commit 631277d into main Nov 23, 2024
6 checks passed
@gaearon gaearon deleted the hotness branch November 23, 2024 03:57
@trivikr
Copy link
Contributor

trivikr commented Nov 23, 2024

Posted PR to update @atproto/dev-env in #6652

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants